#include<iostream>

using std::cout;
using std::endl;

class Base 
{
    virtual void Print()=0;
private:
    long _base =1;
};
class Derived
:public Base
{
public:
    void Print() override
    {
        cout<<"print"<<endl;
    }
    virtual void de() 
    {
        cout<<"derived"<<endl;
    }
private:
    long _derive = 5;
};

int main()
{
    Derived test;

    long * addr=(long*)&test;
    cout<<addr[0]<<endl;
    cout<<addr[1]<<endl;
    cout<<addr[2]<<endl;
    addr[2]=10;
    cout<<addr[2]<<endl;

    cout<<endl;
    long* addr2=(long*)addr[0];
    cout<<addr2[0]<<endl;
    cout<<addr2[1]<<endl;
    typedef void(*func)();
    func pt=(func)addr2[0];
    pt();
    pt=(func)addr2[1];
    pt();
}







    
